﻿package frEngine.effectEditTool.parser
{
    import baseEngine.basic.*;
    import baseEngine.core.*;
    import baseEngine.modifiers.*;
    import flash.display.*;
    import flash.display3D.*;
    import flash.geom.*;
    import frEngine.animateControler.keyframe.*;
    import frEngine.animateControler.particleControler.*;
    import frEngine.animateControler.skilEffect.*;
    import frEngine.animateControler.uvControler.*;
    import frEngine.core.mesh.*;
    import frEngine.effectEditTool.lineRoad.*;
    import frEngine.effectEditTool.manager.*;
    import frEngine.effectEditTool.obj3d.*;
    import frEngine.effectEditTool.parser.def.*;
    import frEngine.loaders.*;
    import frEngine.math.*;
    import frEngine.pools.*;
    import frEngine.primitives.*;
    import frEngine.primitives.lightingline.bullet.*;
    import frEngine.shader.*;

    public class ParserLayerObject extends Object
    {
        public static const instance:ParserLayerObject = new ParserLayerObject;
        public static const defaultNullStringFlag:String = "未选择";

        public function ParserLayerObject()
        {
            return;
        }// end function

        public function parserLayerHang(param1:Obj3dContainer, param2:String, param3:String, param4:String, param5:Boolean) : void
        {
            var _loc_7:Pivot3D = null;
            var _loc_8:ParticleMesh = null;
            var _loc_9:GeometryLighting = null;
            var _loc_10:Md5Mesh = null;
            var _loc_11:Vector3D = null;
            var _loc_6:* = param1.getObject3dByID(param2);
            if (_loc_6 is ParticleMesh)
            {
                _loc_8 = ParticleMesh(_loc_6);
            }
            if (_loc_6 is GeometryLighting)
            {
                _loc_9 = GeometryLighting(_loc_6);
                if (_loc_9.hangStart)
                {
                    if (_loc_9.startHangTemple)
                    {
                        _loc_9.startHangObj = param1.temple.getMeshByUid(_loc_9.startHangObjUid);
                    }
                    else
                    {
                        _loc_9.startHangObj = param1.getObject3dByID(_loc_9.startHangObjUid) as Mesh3D;
                    }
                }
                if (_loc_9.hangEnd)
                {
                    if (_loc_9.endHangTemple)
                    {
                        _loc_9.endHangObj = param1.temple.getMeshByUid(_loc_9.endHangObjUid);
                    }
                    else
                    {
                        _loc_9.endHangObj = param1.getObject3dByID(_loc_9.endHangObjUid) as Mesh3D;
                    }
                }
                _loc_9.freshPoints();
            }
            if (!param3 || param3.length == 0)
            {
                if (_loc_6.curHangControler)
                {
                    _loc_6.curHangControler.removeHang(_loc_6);
                    _loc_6.curHangControler = null;
                }
                if (_loc_6.parent != param1)
                {
                    _loc_6.parent = param1;
                }
                return;
            }
            if (!param5)
            {
                _loc_7 = param1.getObject3dByID(param3);
            }
            else
            {
                _loc_7 = param1.temple.getMeshByUid(param3);
            }
            if (!_loc_7 || _loc_7 == _loc_6)
            {
                return;
            }
            if (param4 && _loc_7 is Md5Mesh)
            {
                _loc_10 = Md5Mesh(_loc_7);
                if (param5)
                {
                    if (!param1.useFightedPoint)
                    {
                        _loc_10.targetMd5Controler.attachObjectToBone(param4, _loc_6);
                    }
                    else
                    {
                        if (_loc_6.curHangControler)
                        {
                            _loc_6.curHangControler.removeHang(_loc_6);
                            _loc_6.curHangControler = null;
                        }
                        _loc_11 = _loc_10.targetMd5Controler.getGJointPoseByName(param4);
                        if (_loc_11)
                        {
                            _loc_6.y = _loc_11.y * _loc_10.scaleY;
                        }
                        else
                        {
                            _loc_6.y = 200;
                        }
                        _loc_6.parent = param1;
                    }
                }
                else
                {
                    _loc_10.targetMd5Controler.attachObjectToBone(param4, _loc_6);
                }
            }
            else
            {
                if (_loc_6.curHangControler)
                {
                    _loc_6.curHangControler.removeHang(_loc_6);
                    _loc_6.curHangControler = null;
                }
                _loc_7.addChild(_loc_6);
                _loc_6.identityOffsetTransform();
            }
            return;
        }// end function

        public function parserParentLayer(param1:Obj3dContainer, param2:Object, param3:Boolean, param4:RenderList) : void
        {
            var _loc_5:Mesh3D = null;
            switch(param2.type)
            {
                case ELayerType.Model:
                {
                    _loc_5 = this.addMeshLayer(param1, param2, param4);
                    break;
                }
                case ELayerType.Geometry:
                {
                    _loc_5 = this.addGeometryLayer(param1, param2, param4);
                    break;
                }
                case ELayerType.DaoGuang:
                {
                    _loc_5 = this.addSwordLightLayer(param1, param2, param4);
                    break;
                }
                case ELayerType.Particle:
                {
                    _loc_5 = this.addParticleLayer(param1, param2, param4);
                    break;
                }
                case ELayerType.Hang:
                {
                    _loc_5 = this.addContainerLayer(param1, param2, param3, param4);
                    break;
                }
                case ELayerType.Road:
                {
                    _loc_5 = this.addLineRoadLayer(param1, param2, param3, param4);
                    break;
                }
                default:
                {
                    break;
                }
            }
            _loc_5.isParticleElement = true;
            _loc_5.enabledPool = false;
            param1.registerObject(param2.uid, param2.name, _loc_5);
            _loc_5.setLayer(param2.layerIndex, false);
            param1.addChild(_loc_5);
            this.setObj3dBaseLayerAttributes(_loc_5, param2);
            this.createTargetControler(_loc_5, param2.frameBlock.keyFrames, AnimateControlerType.VisibleContoler, "visible");
            this.setObj3dMaterialProperty(_loc_5, param2);
            return;
        }// end function

        public function parserChildrenLayer(param1:Obj3dContainer, param2:String, param3:Array) : void
        {
            var _loc_7:Object = null;
            var _loc_8:String = null;
            var _loc_9:int = 0;
            var _loc_10:Modifier = null;
            var _loc_11:FrUvStepControler = null;
            var _loc_12:int = 0;
            var _loc_13:int = 0;
            var _loc_14:UVCenterScaleControler = null;
            var _loc_15:Number = NaN;
            var _loc_16:Number = NaN;
            var _loc_17:Boolean = false;
            var _loc_18:Boolean = false;
            var _loc_19:LineRoadControler = null;
            var _loc_20:LineRoadMesh3D = null;
            var _loc_4:* = param1.getObject3dByID(param2);
            var _loc_5:* = param3.length;
            var _loc_6:int = 0;
            while (_loc_6 < _loc_5)
            {
                
                _loc_7 = param3[_loc_6];
                _loc_8 = _loc_7.type;
                _loc_9 = AnimateControlerManager.getAnimateTypeByFlag(_loc_8);
                _loc_10 = this.createTargetControler(_loc_4, _loc_7.frameBlock.keyFrames, _loc_9, _loc_8);
                if (_loc_10 is FrUvStepControler)
                {
                    _loc_11 = FrUvStepControler(_loc_10);
                    _loc_12 = _loc_7.vNum;
                    _loc_13 = _loc_7.uNum;
                    _loc_11.init(_loc_12, _loc_13, _loc_12 * _loc_13, _loc_7.cycleInterval, _loc_7.cycleType, _loc_7.startIndex, _loc_7.useRandom);
                }
                else if (_loc_10 is UVCenterScaleControler)
                {
                    _loc_14 = UVCenterScaleControler(_loc_10);
                    _loc_15 = _loc_7.u == null ? (0.5) : (_loc_7.u);
                    _loc_16 = _loc_7.v == null ? (0.5) : (_loc_7.v);
                    _loc_17 = _loc_7.uEnabled == null ? (true) : (_loc_7.uEnabled);
                    _loc_18 = _loc_7.vEnabled == null ? (true) : (_loc_7.vEnabled);
                    _loc_14.reInit(_loc_15, _loc_16, _loc_17, _loc_18);
                }
                else if (_loc_7.lineRoadUid)
                {
                    _loc_19 = LineRoadControler(_loc_10);
                    _loc_20 = param1.getObject3dByID(_loc_7.lineRoadUid) as LineRoadMesh3D;
                    _loc_19.init(_loc_20, _loc_7.useRot);
                }
                _loc_6++;
            }
            return;
        }// end function

        public function setObj3dMaterialProperty(param1:Mesh3D, param2:Object, param3:Boolean = true) : void
        {
            var _loc_5:String = null;
            var _loc_6:String = null;
            var _loc_7:Number = NaN;
            var _loc_8:Vector3D = null;
            var _loc_9:Number = NaN;
            var _loc_10:BitmapData = null;
            var _loc_4:* = param1.material.materialParams;
            if (param3)
            {
                _loc_5 = this.checkFileName(param2.materialUrl);
                if (_loc_5)
                {
                    param1.setMaterial(_loc_5, Texture3D.MIP_NONE, _loc_5);
                }
                else
                {
                    param1.setMaterial(13421772, Texture3D.MIP_NONE, "0xcccccc");
                }
            }
            this.setMaterialBlendMode(param1, param2.blendType, param2.blendCustomSource, param2.blendCustomTarget);
            _loc_4.depthWrite = param2.isDepthWrite;
            if (param2.disableDepthCompare)
            {
                _loc_4.depthCompare = Context3DCompareMode.ALWAYS;
            }
            else
            {
                _loc_4.depthCompare = Context3DCompareMode.LESS_EQUAL;
            }
            _loc_4.twoSided = param2.materialIsDblFace;
            _loc_4.uvRepeat = param2.uvRepeat;
            if (param2.colorKill)
            {
                _loc_4.colorKillvalue = 0.1;
            }
            else
            {
                _loc_4.colorKillvalue = 0;
            }
            if (param2.isOpenMaterialMask && param2.materialMaskUrl)
            {
                _loc_6 = this.checkFileName(param2.materialMaskUrl);
                _loc_4.setMaskRotateAngle(param2.materialMaskU, param2.materialMaskV, param2.materialMaskRotation, _loc_6, param2.isShowMask);
            }
            if (param2.isOpenUVScale)
            {
                param1.material.materialParams.uvScaleBasePoint.x = param2.uvScaleX;
                param1.material.materialParams.uvScaleBasePoint.y = param2.uvScaleY;
                param1.setUvScaleBase(param2.uvScaleX, param2.uvScaleY);
            }
            if (param2.isOpenUVOffset)
            {
                param1.material.materialParams.UVoffsetBase.x = param2.uvOffsetX;
                param1.material.materialParams.UVoffsetBase.y = param2.uvOffsetY;
                param1.setUvOffsetBase(param2.uvOffsetX, param2.uvOffsetY);
            }
            if (param2.isOpenUVRotate)
            {
                _loc_7 = param2.uvRotate * Math.PI / 180;
                _loc_4.setUvRotateBase(_loc_7);
            }
            if (param2.isOpenAlphaKil)
            {
                this.parserAlphaKil(_loc_4, true, param2.alphaKilValue);
            }
            if (param2.isOpenHerizionKil)
            {
                _loc_4.isOpenHerizionKil = param2.isOpenHerizionKil;
            }
            if (param2.isOpenColorOffset)
            {
                _loc_4.colorBase = param2.colorOffsetValue;
            }
            if (param2.rimColorStrengthValue)
            {
                _loc_4.setRimBaseColor(param2.rimColorValue, param2.useRimlight, param2.rimColorStrengthValue);
            }
            else
            {
                _loc_4.setRimBaseColor(param2.rimColorValue, param2.useRimlight);
            }
            _loc_4.enableOutLight = param2.useOutlight;
            _loc_4.outLightStrength = param2.outColorStrengthValue;
            _loc_4.outLightAsBgColor = param2.asBgColor;
            if (param2.outColorValue != null)
            {
                _loc_8 = new Vector3D();
                _loc_9 = param2.outColorValue;
                _loc_8.x = (_loc_9 >> 16 & 255) / 255;
                _loc_8.y = (_loc_9 >> 8 & 255) / 255;
                _loc_8.z = (_loc_9 & 255) / 255;
                _loc_4.outLightColor = _loc_8;
            }
            if (param2.useSimpleWater && false)
            {
                _loc_10 = new BitmapData(512, 512, true, 2856337520);
                param1.setMaterial(_loc_10, 0, "bgMap");
                _loc_4.SimpleWaterParames = param2.SimpleWaterParames;
                _loc_4.enableSimpleWater = param2.useSimpleWater;
                param1.getAnimateControlerInstance(AnimateControlerType.SimpleWaterController);
            }
            if (param2.useFog && false)
            {
                _loc_4.enableFog = param2.useFog;
                _loc_4.FogColor = param2.fogColorValue;
            }
            param1.independentRot = param2.independentRot;
            param1.independentScale = param2.independentScale;
            param1.worldTransformChanged = true;
            if (param2.useUvRoll)
            {
                _loc_4.SetUvRoll(param2.useUvRoll, param2.uSpeed, param2.vSpeed);
            }
            if (param2.useSecondRoll)
            {
                _loc_4.SetSecondRollTexture(param2.useSecondRoll, param2.secFileName, param2.secUSpeed, param2.secVSpeed, param2.seclightValue);
            }
            return;
        }// end function

        public function parserAlphaKil(param1:MaterialParams, param2:Boolean, param3:Number) : void
        {
            if (param2)
            {
                param1.alphaKillvalue = param3;
            }
            else
            {
                param1.alphaKillvalue = 0;
            }
            return;
        }// end function

        public function setMaterialBlendMode(param1:Mesh3D, param2:String, param3:String, param4:String) : void
        {
            var _loc_5:* = EngineConstName.getBlendModeByName(param2);
            param1.setMateiralBlendMode(_loc_5, param3, param4);
            return;
        }// end function

        private function setObj3dBaseLayerAttributes(param1:Pivot3D, param2:Object) : void
        {
            var _loc_6:Object = null;
            var _loc_7:String = null;
            var _loc_3:* = param2.baseLayerAttributes;
            var _loc_4:* = _loc_3.length;
            var _loc_5:int = 0;
            while (_loc_5 < _loc_4)
            {
                
                _loc_6 = _loc_3[_loc_5];
                if (_loc_6.hasOwnProperty("value"))
                {
                    _loc_7 = AnimateControlerManager.changeBaseFlagToProperty(_loc_6.name);
                    var _loc_8:* = _loc_6.value;
                    param1[_loc_7] = _loc_6.value;
                }
                _loc_5++;
            }
            return;
        }// end function

        private function addContainerLayer(param1:Object, param2:Object, param3:Boolean, param4:RenderList) : Mesh3D
        {
            var _loc_5:Mesh3D = null;
            var _loc_6:Dummy = null;
            var _loc_7:EmptyDummy = null;
            if (param3)
            {
                _loc_6 = FrObjectPool.getObject(Dummy, param1, "");
                _loc_5 = _loc_6;
                _loc_6.reinit(20, 1, 16777215, 0, null);
            }
            else
            {
                _loc_7 = FrObjectPool.getObject(EmptyDummy, param1, "");
                _loc_7.reinit(null);
                _loc_5 = _loc_7;
            }
            return _loc_5;
        }// end function

        private function addLineRoadLayer(param1:Object, param2:Object, param3:Boolean, param4:RenderList) : Mesh3D
        {
            var _loc_5:* = FrObjectPool.getObject(LineRoadMesh3D, param1);
            var _loc_6:* = param2.layerSpecialAttribute;
            if (param3)
            {
                _loc_5.reinit(param4);
                _loc_5.initLine(_loc_6.pointList, _loc_6.totalLen);
                _loc_5.drawLine();
            }
            else
            {
                _loc_5.reinit(null);
                _loc_5.initLine(_loc_6.pointList, _loc_6.totalLen);
            }
            return _loc_5;
        }// end function

        private function addParticleLayer(param1:Object, param2:Object, param3:RenderList) : Mesh3D
        {
            var _loc_5:Mesh3D = null;
            var _loc_7:ParticleMesh = null;
            var _loc_8:Array = null;
            var _loc_9:FrCube = null;
            var _loc_4:* = param2.layerSpecialAttribute;
            var _loc_6:* = this.checkFileName(_loc_4.particleName);
            if (_loc_6)
            {
                _loc_7 = FrObjectPool.getObject(ParticleMesh, param1, "");
                _loc_7.reinit(_loc_6, param3, true);
                _loc_7.setUseScale(_loc_4.useScale);
                _loc_7.setUseRotation(_loc_4.useRotation);
                if (_loc_4.resetEndPoint)
                {
                    _loc_8 = this.getHangBoneAndUid(_loc_4.hangString);
                    _loc_7.setTargetEndPoint(true, _loc_8[1], _loc_8[0], _loc_4.hangToTemple);
                }
                else
                {
                    _loc_7.setTargetEndPoint(false, null, null, false);
                }
                _loc_5 = _loc_7;
            }
            else
            {
                _loc_9 = FrObjectPool.getObject(FrCube, param1, "");
                _loc_9.reinit(param3, 20, 20, 20);
                _loc_5 = _loc_9;
            }
            return _loc_5;
        }// end function

        private function addSwordLightLayer(param1:Object, param2:Object, param3:RenderList) : Mesh3D
        {
            var _loc_12:Mesh3D = null;
            var _loc_13:SwordLightMesh_Bone = null;
            var _loc_14:Vector3D = null;
            var _loc_15:SwordLightControler_Bone = null;
            var _loc_16:Array = null;
            var _loc_17:SwordLightMesh_Normal = null;
            var _loc_18:SwordLightControler_Normal = null;
            var _loc_4:* = param2.layerSpecialAttribute;
            var _loc_5:* = _loc_4.type;
            var _loc_6:* = _loc_4.length1;
            var _loc_7:* = _loc_4.length2;
            var _loc_8:* = _loc_4.angle * MathConsts.DEGREES_TO_RADIANS;
            var _loc_9:* = _loc_4.section;
            var _loc_10:* = _loc_4.splitNum;
            var _loc_11:* = _loc_4.hasLineControler;
            if (_loc_5 == ESwordLightType.Bone)
            {
                _loc_13 = FrObjectPool.getObject(SwordLightMesh_Bone, param1, "swordMesh");
                if (_loc_4.axis)
                {
                    _loc_16 = _loc_4.axis.split(",");
                    _loc_14 = new Vector3D(_loc_16[0], _loc_16[1], _loc_16[2]);
                }
                _loc_13.reinit(param3);
                _loc_12 = _loc_13;
                _loc_15 = _loc_12.getAnimateControlerInstance(AnimateControlerType.swordLight_Bone) as SwordLightControler_Bone;
                _loc_15.initData(_loc_6, _loc_7, _loc_8, _loc_9, _loc_4.offsetY, _loc_10, _loc_14);
            }
            else
            {
                _loc_17 = FrObjectPool.getObject(SwordLightMesh_Normal, param1, "swordMesh");
                _loc_17.reinit(param3);
                _loc_12 = _loc_17;
                _loc_18 = _loc_12.getAnimateControlerInstance(AnimateControlerType.swordLight_Normal) as SwordLightControler_Normal;
                _loc_18.hasLineControler = _loc_11;
                _loc_18.initData(_loc_6, _loc_7, _loc_8, _loc_9, _loc_10);
            }
            return _loc_12;
        }// end function

        private function addGeometryLayer(param1:Object, param2:Object, param3:RenderList) : Mesh3D
        {
            var _loc_7:Mesh3D = null;
            var _loc_8:FrAnimCylinder = null;
            var _loc_9:FrPlane = null;
            var _loc_10:Boolean = false;
            var _loc_11:String = null;
            var _loc_12:Vector3D = null;
            var _loc_13:FrCrossPlane = null;
            var _loc_14:GeometryLighting = null;
            var _loc_15:FrCube = null;
            var _loc_4:* = param2.layerSpecialAttribute;
            var _loc_5:* = param2.name;
            var _loc_6:* = _loc_4.geometryType;
            if (_loc_6 == EGeometryType.Cylinder)
            {
                _loc_8 = FrObjectPool.getObject(FrAnimCylinder, param1, _loc_5);
                _loc_8.reinit(param3, _loc_4.upRadius, _loc_4.downRadius, _loc_4.height, _loc_4.edges, null, _loc_4.isSphereTexture);
                _loc_7 = _loc_8;
            }
            else if (_loc_6 == EGeometryType.Plane)
            {
                _loc_9 = FrObjectPool.getObject(FrPlane, param1, _loc_5);
                _loc_7 = _loc_9;
                _loc_10 = _loc_4.isChangeUV;
                if (_loc_4.isTowardsCamera)
                {
                    _loc_11 = _loc_10 ? ("-xy") : ("+xy");
                    if (_loc_4.isRotationAxis)
                    {
                        _loc_12 = new Vector3D(_loc_4.axisX, _loc_4.axisY, _loc_4.axisZ);
                        _loc_9.reinit(param3, _loc_4.width, _loc_4.length, null, true, _loc_12, _loc_11);
                    }
                    else
                    {
                        _loc_9.reinit(param3, _loc_4.width, _loc_4.length, null, true, null, _loc_11);
                    }
                }
                else
                {
                    _loc_11 = _loc_10 ? ("-xz") : ("+xz");
                    _loc_9.reinit(param3, _loc_4.width, _loc_4.length, null, false, null, _loc_11);
                }
            }
            else if (_loc_6 == EGeometryType.CrossPlane)
            {
                _loc_13 = FrObjectPool.getObject(FrCrossPlane, param1, _loc_5);
                _loc_13.reinit(param3, _loc_4.width, _loc_4.height, "y", null);
                _loc_7 = _loc_13;
            }
            else if (_loc_6 == EGeometryType.FlashLine)
            {
                _loc_14 = FrObjectPool.getObject(GeometryLighting, param1, _loc_5);
                _loc_14.renderList = param3;
                _loc_7 = _loc_14;
                _loc_14._lineType = _loc_4.lineType;
                _loc_14._width = _loc_4.lineWidth;
                _loc_14._textureLength = _loc_4.textureLength;
                _loc_14.lineStep = _loc_4.lineStep < 5 ? (5) : (_loc_4.lineStep);
                _loc_14._timeFactor = _loc_4.timeFactor;
                _loc_14._uvSpeed = _loc_4.uvSpeed;
                _loc_14._amplitude0 = _loc_4.amplitude0;
                _loc_14._amplitude1 = _loc_4.amplitude1;
                _loc_14._frequency0 = _loc_4.frequency0;
                _loc_14._frequency1 = _loc_4.frequency1;
                _loc_14._waveWide0 = _loc_4.waveWide0;
                _loc_14._waveWide1 = _loc_4.waveWide1;
                _loc_14._attenuation = _loc_4.attenuation;
                _loc_14.beginOffset = _loc_4.beginOffset;
                _loc_14.startStatic = new Vector3D(_loc_4.startPointX, _loc_4.startPointY, _loc_4.startPointZ);
                _loc_14.endStatic = new Vector3D(_loc_4.endPointX, _loc_4.endPointY, _loc_4.endPointZ);
                _loc_14.hangStart = _loc_4.hangStart;
                _loc_14.hangEnd = _loc_4.hangEnd;
                _loc_14.startHangTemple = _loc_4.startHangTemple;
                _loc_14.endHangTemple = _loc_4.endHangTemple;
                _loc_14.startHangString = _loc_4.startHangString;
                _loc_14.endHangString = _loc_4.endHangString;
            }
            else
            {
                _loc_15 = FrObjectPool.getObject(FrCube, param1, _loc_5);
                _loc_15.reinit(param3, 20, 20, 20, 1, null);
                _loc_7 = _loc_15;
            }
            return _loc_7;
        }// end function

        public function checkFileName(param1:String) : String
        {
            if (param1 == "" || param1 == null || param1 == defaultNullStringFlag)
            {
                return null;
            }
            return param1;
        }// end function

        private function addMeshLayer(param1:Object, param2:Object, param3:RenderList) : Mesh3D
        {
            var _loc_10:Mesh3D = null;
            var _loc_11:Boolean = false;
            var _loc_12:FrCube = null;
            var _loc_4:* = param2.layerSpecialAttribute;
            var _loc_5:* = _loc_4.actionName;
            var _loc_6:* = this.checkFileName(_loc_4.boneUrl);
            var _loc_7:* = this.checkFileName(_loc_4.meshUrl);
            var _loc_8:* = _loc_4.isCirclePlay;
            var _loc_9:* = _loc_4.startPlayFrame;
            if (_loc_7)
            {
                _loc_10 = MeshLoaderManager.getMesh3dByUrl(param1, _loc_7, null, _loc_6, _loc_5, _loc_8, _loc_9, param3);
                if (_loc_10 is Md5Mesh && _loc_6)
                {
                    _loc_11 = _loc_4.hasOwnProperty("isOpenShadow") ? (_loc_4.isOpenShadow) : (true);
                    Md5Mesh(_loc_10).openShadow = _loc_11;
                }
            }
            else
            {
                _loc_12 = FrObjectPool.getObject(FrCube, param1, "");
                _loc_12.reinit(param3, 20, 20, 20);
                _loc_10 = _loc_12;
            }
            return _loc_10;
        }// end function

        private function createTargetControler(param1:Pivot3D, param2:Array, param3:int, param4:String) : Modifier
        {
            var _loc_5:* = param1.getAnimateControlerInstance(param3);
            if (!_loc_5)
            {
                return null;
            }
            if (_loc_5.targetObject3d != param1)
            {
                _loc_5.targetObject3d = param1;
            }
            _loc_5.parserKeyFrames(param2);
            _loc_5.toUpdateAnimate(true);
            return _loc_5;
        }// end function

        private function getHangBoneAndUid(param1:String) : Array
        {
            var _loc_2:Array = null;
            if (!param1)
            {
                _loc_2 = [];
            }
            else
            {
                _loc_2 = param1.split("||");
            }
            _loc_2.length = 3;
            var _loc_3:* = _loc_2[0];
            var _loc_4:* = _loc_2[1];
            return [_loc_4, _loc_3];
        }// end function

    }
}
